import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthGuard } from './auth.guard';
import { JwtModule } from '@nestjs/jwt';
import { UserModule } from 'src/feature/user/user.module';
import { CommonModule } from 'src/common/common.module';

@Module({
  providers: [AuthService, AuthGuard],
  imports: [
    JwtModule.register({
      secret: 'your-secret-key', // 应与UserModule中配置的一致
      signOptions: { expiresIn: '60s' },
    }),
    UserModule,
    CommonModule,
  ],
  exports: [AuthService, AuthGuard],
})
export class AuthModule {}
